<?php


namespace app\store\model\lottery;

use app\common\model\lottery\Action as ActionModel;
use think\Cache;

class Action extends ActionModel
{
    public static function getList($length = 15)
    {
        $lotteries =  self::order('create_time desc')->paginate($length);
        return $lotteries;
    }

    public function add(array $data)
    {
        $data['wxapp_id'] = static::$wxapp_id;
        return $this->allowField(true)->save($data);
    }
}